package com.xmut.mall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xmut.mall.product.dao.SkuDescDao;
import com.xmut.mall.product.entity.SkuDescEntity;
import com.xmut.mall.product.service.SkuDescService;
import com.xmut.mall.product.utils.RespBean;
import org.springframework.stereotype.Service;

@Service("skuDescService")
public class SkuDescServiceImpl extends ServiceImpl<SkuDescDao, SkuDescEntity> implements SkuDescService {

    /**
     * 获取sku的详情大图
     * @param skuId
     * @return
     */
    @Override
    public RespBean getSkuDescById(Long skuId) {
        SkuDescEntity sku_id = this.getOne(new QueryWrapper<SkuDescEntity>().eq("sku_id", skuId));
        return RespBean.success("获取成功",sku_id);
    }
}
